﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Permissions;
using System.IO;



namespace geFormRevI
{
    [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
    public partial class geForm : Form
    {
        public geForm()
        {
            InitializeComponent();
            browser.Url = new Uri(Directory.GetCurrentDirectory() + "\\gepage.htm");
            browser.ObjectForScripting = this;
        }
        public void toggleGrid()
        {
            browser.Document.InvokeScript("togglegrid");
        }
        public void geLoadFailed()
        {

        }
        //public void mouseClicked(int button, int clientX, int clientY, int screenX, int screenY, float latitude, float longitude, float altitude, bool hitglobe, bool altKey, bool ctrlKey, bool shiftKey, string relatedTarget)
        //public void mouseClicked(string button)
        public void mouseClicked(string button, string clientX, string clientY, string screenX, string screenY, string latitude, string longitude, string altitude, string hitglobe, string altKey, string ctrlKey, string shiftKey, object relatedTarget)
        {
            logField.Text = logField.Text + Environment.NewLine + (relatedTarget.GetType());
            logField.Refresh();
        }

        private void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {

        }

        private void geForm_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }
    }
}
